
{include file='tpl_admin_header.html'}

<body class="wp-admin ">
<div id="wpwrap">
<div id="wpcontent">
<div id="wphead">
<h1>AGrind Designer</h1>
</div>
<div id="user_info"><p>您好，<a href="profile.php">admin</a> | <a href="{ url controller='admin' action='logout' }" title="注销">注销</a></p></div>

{include file='tpl_admin_menu.html'}

<div id="wpbody">
{$message}

<div class="wrap">

<h2>{$menuName}</h2>
<br class="clear" />

<br class="clear" />
<table class="widefat">
	<thead>
	<tr>
		<th scope="col" class="check-column"></th>
		<th scope="col">序号</th>
		<th scope="col">曲目名称</th>
		<th scope="col">歌词</th>		
		<th scope="col">操作</th>
	</tr>
	</thead>
	<tbody>
	<form name="addcat" id="addcat" class="add:the-list: validate" method="post" action="{ url controller='mngralbum' action='sadd' }">
	<input type="hidden" name="album_id" value="{$album_id}" />
	<tr id='post-3' class='alternate author-self status-publish' valign="top">

		<th scope="row" class="check-column"></th>		
		<td><input name="song_seq" id="song_seq" type="text" value="" size="10" /></td>
		<td><input name="song_title" id="song_title" type="text" value="" size="40" /></td>			
		<td><textarea name="song_lyric" id="song_lyric" rows="6" cols="40"></textarea></td>
		<td><input type="submit" class="button" name="add" value="增加"></td>
	</tr>
	</form>
	
	{foreach item=song from=$songList}	
	<form name="addcat" id="addcat" class="add:the-list: validate" method="post" action="{ url controller='mngralbum' action='supdate' }">
	<input type="hidden" name="album_id" value="{$album_id}" />
	<input type="hidden" name="song_id" value="{$song.song_id}" />
	<tr id='post-3' class='alternate author-self status-publish' valign="top">
		<th scope="row" class="check-column"></th>		
		<td><input name="song_seq" id="song_seq" type="text" value="{$song.song_seq}" size="10" /></td>
		<td><input name="song_title" id="song_title" type="text" value="{$song.song_title}" size="40" /></td>			
		<td><textarea name="song_lyric" id="song_lyric" rows="6" cols="40">{$song.song_lyric}</textarea></td>
		<td><input type="submit" class="button" name="update" value="修改">  <input type="button" class="button" name="delete" value="删除" onclick="window.location='{ url controller='mngralbum' action='sdelete' sid=$song.song_id}';"></td>
	</tr>	
	</form>
	{/foreach}	
	</tbody>
</table>
<p>{$playlist}</p>
<p class="submit"><input type="button" class="button" name="submit" value="生成Playlist" onclick="window.location='{ url controller='mngralbum' action='splaylist' album_id=$album_id}';"/></p>

<br class="clear" />

</div><!-- wrap -->

</div><!-- wpbody -->
</div><!-- wpcontent -->
</div><!-- wpwrap -->
{include file='tpl_admin_footer.html'}
</body>
</html>
